dxp-ux
POST Product Order (TMF 622)
This operation provides following features for
PR:
- will create the AddLine Order in Salesforce
- AddOn create request towards Salesforce
- To turn on or off e-bill entity
PA:
- To buy a plan for prepaid customers.
URL
https://[localhost]:[port]/dxp-ux/v1/{businessId}/productOrder
URL PARAMS
name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit. | Y (PR, PA) |
Header
name | value | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y (PR ) , Y (PA) |
client_secret | string | Password associated with the client_id. | Y (PR) , Y (PA) |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y(PR - AddLine), N(PR- AddOn), Y(PA) |
channelId | string | channelId to identify the business group. Expected APP | Y(PR-ebill), N/A(PA) |
lob | string | The Line of Business Identifier currently available are:PREPAID, POSTPAID,FIXED | N(PR-ebill), N/A(PA) |
Data Model - Request:
Each of the request parameters is detailed.
name | type (Length for PR- AddLine) | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
channel[] | array | A list of related channels Note for PA: It is mandatory for business | Y (PR-AddLine), N(PR - AddOn), Y(PA) |
channel[].id | string (20) | Unique identifier of the channel Note for PA: It is mandatory for business | Y(PR-AddLine), N(PR - AddOn), Y(PA) |
channel[].name | string (20) | Name of the channel | N/A(PR), N(PA) |
category | string | Used to categorize the order from a business perspective that can be useful for the OM system (e.g. "enterprise", "residential", ...). | N(PR - ebill) , Y (PA) |
description | string (30) | reason, Eg: "Add New Line" | Y(PR-AddLine), N/A(PA) |
externalId | string (20) | a unique id of the order from the source system | Y(PR-AddLine), N/A(PA) |
billingAccount | object | Account reference. | Y(PR-AddLine), N(PR-ebill), N/A(PA) |
billingAccount.id | string (30) | Account number | Y(PR-AddLine), N( PR- ebill), N/A(PA) |
billingAccount.name | string | Name of the account, this is not passing to Salesforce | N(PR-AddLine), N/A(PA) |
billingAccount.@type | string | Reference type, this is not passing to Salesforce | N(PR-AddLine), N(PR- ebill), N/A(PA) |
payment | array | payment info. Mandatory only if paymentCaptured is true | Y*(PR-AddLine), N/A(PA) |
payment.id | string (30) | Payment transactionId. Mandatory only if paymentCaptured is true | Y*(PR-AddLine), N/A(PA) |
@type | string (20) | request type information: Expected value will be: 'AddLine' Note- To work this functionality this type should be passed as 'AddLine' | Y(PR-AddLine), N(PR - AddOn), N(PR - ebill), N(PA) |
productOrderItem | array | A list of product order items | Y(PR-AddLine), N(PR - AddOn), Y(PA) |
productOrderItem.id | String | Identifier of the line item (generally it is a sequence number 01, 02, 03...) | Y (PR-ebill), N(PA) |
productOrderItem.quantity | integer | Quantity ordered. | N(PR-ebill), N(PA) |
productOrderItem.action | String | action of the project order item Note for PR ebill: The action is used to ON or OFF eBill. Can be: add, delete. Note for PA: Possible values are "add" | N(PR - AddOn), Y(PR-ebill), N(PA) |
productOrderItem.@type | String | type of the product. | N(PR - AddOn), N/A(PA) |
productOrderItem.productOffering | object | ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information. | Y(PA) |
productOrderItem.productOffering.id | string | Unique identifier of a productOffering | Y(PA) |
productOrderItem.product | object | A product ref or value | Y(PR-AddLine), N(PR - AddOn), N(PR-ebill), Y(PA) |
productOrderItem.product.id | String | Unique identifier of the product. | N(PR - AddOn), N(PR-ebill), N/A(PA) |
productOrderItem.product.name | String | Name of the product. It could be the same as the name of the product offering. | N(PR - AddOn), N/A(PA) |
productOrderItem.product.isBundle | Boolean | If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering | N(PR-ebill), N/A(PA) |
productOrderItem.product.@type | String | When sub-classing, this defines the sub-class entity name | N(PR-ebill), N/A(PA) |
productOrderItem.product.productCharacteristic[] | Array | Describes a given characteristic of an object or entity through a name/value pair. | Y(PR-AddLine), N(PR-ebill), Y(PA) |
productOrderItem.product.productCharacteristic[].name | String | Name of the characteristic Note for PA:Possible Value is "MSISDN" | Y(PR-AddLine), Y(PR-ebill), Y(PA) |
productOrderItem.product.productCharacteristic[].value | Object/Array | The value of the characteristic | Y(PR-AddLine), N(PR-ebill), Y(PA) |
productOrderItem.product.productCharacteristic[].valueType | string | Value data type | N(PR-AddLine), N(PR-ebill), N/A(PA) |
productOrderItem.product.productCharacteristic[].@type | String | When sub-classing, this defines the sub-class entity name | N(PR - ebill), N/A(PA) |
productOrderItem.product.itemPrice | Object Array | An amount, usually of money, that represents the actual price paid by the Customer for this item or this order. | N(PR - AddOn), N/A(PA) |
productOrderItem.product.itemPrice.name | String | name of the priced item | N(PR - AddOn), N/A(PA) |
productOrderItem.product.itemPrice.description | String | description of the priced item | N(PR - AddOn), N/A(PA) |
productOrderItem.product.itemPrice.price | Object | item price object | N(PR - AddOn), N/A(PA) |
productOrderItem.product.itemPrice.price.dutyFreeAmount | Object | duty free amount object | N(PR - AddOn), N/A(PA) |
productOrderItem.product.itemPrice.price.dutyFreeAmount.unit | String | units of the amount | N(PR - AddOn), N/A(PA) |
productOrderItem.product.itemPrice.price.dutyFreeAmount.value | number | price value | N(PR - AddOn), N/A(PA) |
relatedParty[] | array | related party | N(PR - AddOn), N(PR-ebill), N/A(PA) |
relatedParty[].id | String | unique identifier of the related party | N(PR - AddOn), N(PR-ebill), N/A(PA) |
relatedParty[].name | String | name of the related party | N(PR - AddOn), N(PR-ebill), N/A(PA) |
relatedParty[].@referredType | String | The actual type of the target instance when needed for disambiguation. | Y(PR-ebill), N/A(PA) |
note | array | Extra information about a given entity | N(PR-ebill), N/A(PA) |
note.text | String | Text of the note. | N(PR-ebill), N/A(PA) |
note.@type | String | Defines type as 1. OrderReasonCode and default value is 'NT' 2. CampaignCode and default value is 'ECO'. | N(PR-ebill), N/A(PA) |
Status | string | enum: - acknowledged | N(PR-ebill), N/A(PA) |
channel[] subResource request dataModel:
name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) | example |
---|---|---|---|---|
id | string | unique identifier of the channel | Y(PA) | PA: "id": "APP" |
name | string | Name of the channel | N(PA) | PA: "name": "APP" |
productOrderItem subResource request dataModel:
field | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) | example |
---|---|---|---|---|
id | string | service Number | Y(PA) | PA: "id": "1" |
quantity | integer | Quantity ordered | Y(PA) | PA: "quantity": 1 |
action | string | action of the project order item | Y(PA) | PA: "action": "add" |
productOffering | object | A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information | Y(PA) | PA: "productOffering": { "id": "3940", } |
productOffering.id | string | Unique identifier of a productOffering | Y(PA) | PA: "id": "3940" |
product | object | A product to be created defined by value or existing defined by reference. | Y(PA) | PA: "product" : { "productCharacteristic": [{ "name": "MSISDN", "value": "69877689" }] } |
product.productCharacteristic | array | Describes a given characteristic of an object or entity through a name/value pair. | Y(PA) | PA: "productCharacteristic" : [{ "name": "MSISDN", "value": "69877689" }] |
productOrderItem[].product.productCharacteristic[] subResource request and response dataModel:
name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) | example |
---|---|---|---|---|
MSISDN | string | service Number | Y(PA) | PA: {"name": "MSISDN", "value": "69877689" } |
note subResource - dataModel:
@type | type | required (mandatory-Y, optional-N, Not applicable- N/A) | example |
---|---|---|---|
OrderReasonCode | string | N (PR- ebill) , N/A (PA) | PR: {"text": "NT","@type": "OrderReasonCode"} |
CampaignCode | string | N (PR - ebill), N/A (PA) | PR: {"text": "ECO","@type": "CampaignCode"} |
CONSENTS productCharacteristic values for PR- AddLine usecase:
characteristic name | type (Length) | description | required |
---|---|---|---|
consents | Array | Container for customer consents | Y* |
consentLanguage | string (10) | Language of the consents, Eg: EN or ES | Y* |
consents[].type | string (20) | Type of the consent | Y* |
consents[].id | string (20) | Id of the consent | Y* |
consents[].consentTextVersion | string (5) | version of the consent | Y* |
consents[].state | string (20) | state of the consent (Consented / Not Consented) | Y* |
Note for PR AddLine usecase : Only 'GeneralTnC' is mandatory, Others optional depends on order
DELIVERY-ADDRESS productCharacteristic values for PR- AddLine usecase:
characteristic name | type (Length) | description | required |
---|---|---|---|
deliveryAddress | object | Delivery Address | Y |
street1 | string (50) | Street 1 of address | Y |
street2 | string (50) | Street 2 of address | N |
city | string (50) | City name | Y |
postalcode | string (50) | Postal code | Y |
state | string (50) | State code | Y |
country | string (50) | Country code | Y |
deliveryType | string (20) | must be 'Mail Delivery' | Y |
deliverySpeed | string (20) | must be 'Standard' | Y |
LINE-DETAILS productCharacteristic values for PR- AddLine usecase:
characteristic name | type (Length for PR-AddLine) | description | required |
---|---|---|---|
lineDetails | array | Details of each line including plan and device | Y |
lineNumber | string (5) | 1, 2,3 etc - its mandatory if lineDetails object is present | Y |
planDetails | object | Details of the plan | Y |
planDetails{}.msisdn | string (20) | New msisdn for this line | Y |
planDetails{}.nokiaReservationId | string (30) | Nokia reservation id of the msisdn | Y |
planDetails{}.planSku | string (60) | The salesforce Product code | Y |
planDetails{}.simType | string (30) | Type of the sim | Y |
planDetails{}.aliasFirstName | string (50) | First name of the customer holding this line | Y |
planDetails{}.aliasLastName | string (50) | Last name of the customer holding this line | Y |
planDetails{}.addOnDetails | array | Add on details. Note - Minimum one object is mandatory if this addOnDetails array comes. | N |
planDetails{}.addOnDetails[].addonName | string (60) | add-on name | Y |
planDetails{}.addOnDetails[].addonId | string (60) | add-on unique code | Y |
planDetails{}.addOnDetails[].attributeCode | string (60) | attribute unique code | Y |
planDetails{}.addOnDetails[].attributeValue | string (60) | attribute value | Y |
deviceDetails | object | Device details | Y |
deviceDetails{}.deviceSku | string (20) | sku of the device | Y |
deviceDetails{}.reservationId | string (20) | SAP reservation id of the device | Y |
deviceDetails{}.installments | boolean | true or false | Y |
deviceDetails{}.quickUpgrade | boolean | true OR false | Y |
deviceDetails{}.insurance | string (20) | 1 OR 4 OR blank | N |
deviceDetails{}.byod | boolean | true OR false | N |
deviceDetails{}.byodDetails{} | object | BYOD details | N |
deviceDetails{}.byodDetails{}.imei | string | IMEI number of the device | N |
deviceDetails{}.byodDetails{}.model | string | Device Model | N |
deviceDetails{}.byodDetails{}.manufacturer | string | Device Manufacturer | N |
deviceDetails{}.byodDetails{}.capacity | string | Device storage capacity | N |
deviceDetails{}.byodDetails{}.color | string | Device color | N |
deviceDetails{}.installmentDetails | object | mandatory if Installments is true | Y* |
deviceDetails{}.installmentDetails{}.term | string (5) | The term of the installment | Y |
deviceDetails{}.installmentDetails{}.frequencyAmount | string (10) | The monthly installment amount | Y |
deviceDetails{}.installmentDetails{}.financedAmount | string (10) | Total financed amount | Y |
deviceDetails{}.installmentDetails{}.downpayment | string (10) | Down payment of the installment | Y |
deviceDetails{}.installmentDetails{}.downpaymentTax | string (10) | Tax of down payment | Y |
CREDIT-DETAILS productCharacteristic values for PR- AddLine usecase:
characteristic name | type (Length) | description | required |
---|---|---|---|
creditDetails | object | Credit info | N |
creditScore | string (10) | Credit score | N |
creditSegment | string (5) | credit Segment | N |
creditScoreDate | string (20) | Credit score captured date | N |
Note for PR AddLine usecase: All three credit check parameters together are mandatory OR all of them together optional.
PAYMENT-DETAILS productCharacteristic values for PR- AddLine usecase:
characteristic name | type (Length) | description | required |
---|---|---|---|
PaymentDetails | object | Payment info | Y |
paymentCaptured | boolean | Payment Captured (true OR false) | Y |
Data Model - Response:
Each of the response parameters is detailed.
name | type | description | required (mandatory-Y, optional-N, Not applicable- N/A) |
---|---|---|---|
state | string | The state of the order Possible values for PA: completed, rejected | N(PR-AddLine , AddOn), Y(PA) |
note | array | Extra information about a given entity | N(PR-AddLine), N(PR - ebill), N/A (PA) |
note[].text | string | Text of the note | N(PR-AddLine), N(PR - ebill), N/A (PA) |
note[].@type | string | Defines type as CampaignCode and default value is 'ECO. | N(PR - ebill), N/A (PA) |
category | string | Used to categorize the order from a business perspective that can be useful for the OM system (e.g. "enterprise", "residential", ...) | Y(PA) , N(PR - ebill) |
orderDate | string | Date when the order was created | Y(PA) |
requestedCompletionDate | string | Requested delivery date from the requestor perspective Note for PA: This field mandatory when the state is completed | Y(PA) |
cancellationReason | string | Reason why the order is cancelled. This is used when order is cancelled. Note for PA: This field mandatory when the state is rejected | Y(PA) |
requestedStartDate | string | Order fulfillment start date wished by the requestor Note for PA: This field mandatory when the state is completed | Y(PA) |
productOrderItem[] | array | An identified part of the order. A product order is decomposed into one or more order items. | Y(PA) |
productOrderItem[].id | string | dentifier of the line item (generally it is a sequence number 01, 02, 03, ...) | Y(PA), Y (PR - ebill) |
productOrderItem[].quantity | integer | Quantity ordered | Y(PA) N (PR - ebill) |
productOrderItem[].action | string | action to be performed on the product Note for PA: The action is "add" Note for PR -ebill usecase: The action is used to ON or OFF eBill. Can be: add, delete. | Y(PA), Y (PR - ebill) |
productOrderItem[].productOffering | object | A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information. | Y(PA) |
productOrderItem[].productOffering.id | string | Unique identifier of a productOffering entity. | Y(PA) |
productOrderItem[].productOffering.name | string | name of the productOffering entity. | Y(PA) |
productOrderItem[].productOffering.@referredType | string | The actual type of the target instance when needed for disambiguation. | Y(PA) |
productOrderItem.product | Object Array | A product to be created defined by value or existing defined by reference. | N (PR - ebill), Y (PA) |
productOrderItem.product.id | String | Unique identifier of the product. | N (PR - ebill), N/A (PA) |
productOrderItem.product.isBundle | Boolean | If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering | N (PR - ebill), N/A (PA) |
productOrderItem.product.@type | String | When sub-classing, this defines the sub-class entity name | N (PR - ebill), N/A (PA) |
productOrderItem.product.productCharacteristic[] | Array of object | Describes a given characteristic of an object or entity through a name/value pair. | N(PR - ebill), Y (PA) |
productOrderItem.product.productCharacteristic[].name | String | Name of the characteristic Note for PA:Possible Value is "MSISDN" | Y(PR - ebill), Y (PA) |
productOrderItem.product.productCharacteristic[].valueType | String | Data type of the value of the characteristic | N(PR - ebill), N/A (PA) |
productOrderItem.product.productCharacteristic[].value | any | The value of the characteristic | N(PR - ebill), Y(PA) |
productOrderItem.product.productCharacteristic[].@type | String | When sub-classing, this defines the sub-class entity name | N(PR - ebill), N/A (PA) |
Status | string | enum: - acknowledged | N(PR - ebill), N/A (PA) |
relatedParty[] | array | related party | N(PR - AddOn), N(PR-ebill), N/A(PA) |
relatedParty[].id | String | unique identifier of the related party | N(PR - AddOn), N(PR-ebill), N/A(PA) |
relatedParty.name | String | Name of the related entity.. | N(PR - ebill), N/A (PA) |
relatedParty[].@referredType | String | The actual type of the target instance when needed for disambiguation. | Y(PR-ebill), N/A(PA) |
@type | string | When sub-classing, this defines the sub-class entity name | N(PA) , N(PR - ebill) |
billingAccount | array | Account reference. | N(PR - ebill), N/A (PA) |
billingAccount.id | String | Unique identifier Id of the EntityRef | N(PR - ebill), N/A (PA) |
billingAccount.@type | String | When sub-classing, this defines the sub-class entity name | N(PR - ebill), N/A (PA) |
productOrderItem subResource response dataModel:
field | type | description | required | example |
---|---|---|---|---|
id | string | service Number | Y(PA) | PA: "id": "1" |
quantity | integer | Quantity ordered | Y(PA) | PA: "quantity": 1 |
action | string | action of the project order item | Y(PA) | PA: "action": "add" |
productOffering | object | A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information | Y(PA) | PA: "productOffering": { "id": "3940", "name": "CWPPDFS0070", "@referredType": "CampaingOffer" } |
productOffering.id | string | Unique identifier of a productOffering | Y(PA) | PA: "id": "3940" |
productOffering.name | string | name of the productOffering entity | N(PA) | PA: "name": "CWPPDFS0070" |
productOffering.'@referredType' | string | The actual type of the target instance when needed for disambiguation. | Y(PA) | PA: "@referredType": "CampaingOffer" |
product | object | A product to be created defined by value or existing defined by reference. | Y(PA) | PA: "product" : { "productCharacteristic": [{ "name": "MSISDN", "value": "69877689" }] } |
product.productCharacteristic | array | Describes a given characteristic of an object or entity through a name/value pair. | Y(PA) | PA: "productCharacteristic" : [{ "name": "MSISDN", "value": "69877689" }] |
Key Considerations :
- Please refer the examples from the following URL - DXP UX - POST ProductOrder
PA Implementation:
1. This implementation is used to buy a plan for prepaid users.
2. Following are the mandatory fields in the request payload:
- payload.category - should be sent as "PREPAID" (to identify the type of user).
- channel[].id (to identify the channel).
- productOrderItem[].product.productCharacteristic[].name (should be "MSISDN") and productOrderItem[].product.productCharacteristic[].value (This is MSISDN value).
- productOrderItem[].productOffering.id (This is the Offer ID).
3. Possible values for productOrderItem[].action in request payload is "add". If the field productOrderItem[].action is not provided in the request, default value will be considered as "add".
4. This implementation accepts only one offer per request.
5. For all the dateTime fields
- Any datetime before 1908-04-22 will show offset -05:18
- Any datetime on or after 1908-04-22 will show offset -05:00
PR Implementation:
1. Create Order - Add Line:
- To work this functionality, the field "@type" not empty and value must be equal to "AddLine" in request body
- Salesforce will acknowledge in success scenario ( it's not a real time transaction response )
2. e-bill usecase:
- If the customer need to enable paper bill (disable ebill), in the request productOrderItem.action need to be pass as "add" and if need to disable the paper bill(enable ebill) pass productOrderItem.action as "delete"
Possible Error scenarios for PA:
When order creation is rejected
{
"category": "PREPAID",
"orderDate": "2023-10-23T05:27:28.261-05:00",
"cancellationReason": "Disculpe, no tiene saldo suficiente para activarse en el Plan Ilimitado +Movil",
"state": "rejected",
"productOrderItem": [
{
"id": "1",
"quantity": 1,
"action": "add",
"productOffering": {
"id": "1234",
"name": "",
"@referredType": "CampaingOffer"
},
"product": {
"productCharacteristic": [{
"name": "MSISDN",
"value": "69877689"
}]
}
}],
"@type": "ProductOrder"
}
If offerID is invalid or offer details are not found
{
"errors": [
{
"code": 404,
"message": "LLA:NOT_FOUND",
"description": "The requested offer details could not be found."
}
]
}
Possible Error Scenarios for PR:
[400 ]
{
"errors": [
{
"code": 400,
"message": "SF:POST_PRODUCTORDER",
"description": "Required parameters missing"
}
]
}